home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume14 / nntp1.5 / part01 next >
Encoding:
Internet Message Format  |  1988-04-18  |  62.1 KB

  1. Subject:  v14i047:  Network News Transfer Protocol, version 1.5, Part01/09
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Phil Lapsley <phil@ucbvax.berkeley.edu>
  7. Posting-number: Volume 14, Issue 47
  8. Archive-name: nntp1.5/part01
  9.  
  10. [  NNTP is a protocol and software package that runs on top of TCP/IP.
  11.    Many hosts on the Internet (ARPAnet, MILnet, NSFnet, etc.) use it to
  12.    exchange articles rather than using compressed UUCP batches.  Even if
  13.    you're not on the Internet, but just have a local LAN NNTP is useful.
  14.    Enclosed are patches to the RN sources so that an organization need
  15.    not have a copy of the Netnews database on every single machine at
  16.    their site.  After this posting will be patches to VN that also allow
  17.    this.  --r$  ]
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 1 (of 9)."
  27. # Wrapped by rsalz@fig.bbn.com on Tue Apr 19 18:16:34 1988
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f './Makefile' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'./Makefile'\"
  31. else
  32. echo shar: Extracting \"'./Makefile'\" \(1532 characters\)
  33. sed "s/^X//" >'./Makefile' <<'END_OF_FILE'
  34. X
  35. X#
  36. X# Makefile for NNTP intstallation
  37. X#
  38. X
  39. DISTFILES = Makefile README CHANGES rrnpatches
  40. X
  41. DISTDIRS = common doc inews server support xfer xmit
  42. X
  43. DIST = $(DISTFILES) $(DISTDIRS)
  44. X
  45. X# Make this either "server" or "client" depending on whether
  46. X# you want this package compiled to be a server or a client
  47. X# (You can always say "make server" or "make client" if you want.
  48. X
  49. TYPE = 
  50. X
  51. all: make_$(TYPE)
  52. X
  53. make_:
  54. X    @ echo "If you want to make a server version or a client version,"
  55. X    @ echo "type \"make server\" or \"make client\" respectively."
  56. X    @ echo "See README for details."
  57. X
  58. make_server: /nowhere
  59. X    cd server; make
  60. X    cd support; make
  61. X    cd doc; make
  62. X    cd xmit; make
  63. X
  64. server: make_server
  65. X
  66. make_client: /nowhere
  67. X    cd inews; make
  68. X    cd doc; make
  69. X
  70. client: make_client
  71. X
  72. install: install_$(TYPE)
  73. X
  74. install_:
  75. X    @ echo "If you want to install a server version or"
  76. X    @ echo "a client version, type \"make install_server\""
  77. X    @ echo "or \"make install_client\" respectively."
  78. X    @ echo "See README for more details."
  79. X
  80. install_server:
  81. X    cd server; make install
  82. X    cd support; make install
  83. X    cd doc; make install
  84. X
  85. install_client:
  86. X    cd inews; make install
  87. X    cd doc; make install
  88. X
  89. clean:
  90. X    for i in $(DISTDIRS); do cd $$i; make clean; cd ..; done
  91. X
  92. check:
  93. X    for i in $(DISTDIRS); do cd $$i; make check; cd ..; done
  94. X
  95. distrib: check
  96. X    mkdir ../nntp.dist
  97. X    cp -rp $(DIST) ../nntp.dist
  98. X    cd ../nntp.dist; for i in $(DISTDIRS); do cd $$i; make distrib; cd ..; done
  99. X
  100. rpt: /nowhere
  101. X    tar cf rrnpatches.tar rrnpatches; compress rrnpatches.tar
  102. X
  103. server: /nowhere
  104. client: /nowhere
  105. X
  106. X/nowhere: ;
  107. END_OF_FILE
  108. if test 1532 -ne `wc -c <'./Makefile'`; then
  109.     echo shar: \"'./Makefile'\" unpacked with wrong size!
  110. fi
  111. # end of './Makefile'
  112. fi
  113. if test ! -d './common' ; then
  114.     echo shar: Creating directory \"'./common'\"
  115.     mkdir './common'
  116. fi
  117. if test -f './common/Makefile' -a "${1}" != "-c" ; then 
  118.   echo shar: Will not clobber existing file \"'./common/Makefile'\"
  119. else
  120. echo shar: Extracting \"'./common/Makefile'\" \(222 characters\)
  121. sed "s/^X//" >'./common/Makefile' <<'END_OF_FILE'
  122. X#
  123. X# Makefile for common directory
  124. X#
  125. X
  126. SRCS    =    version.c clientlib.c
  127. OBJS    =    version.o clientlib.o
  128. HFILES    =
  129. X
  130. clean:
  131. X    -rm -f ${OBJS}
  132. X
  133. distrib: clean
  134. X    rm -rf SCCS
  135. X
  136. check:
  137. X    sccs check
  138. X
  139. lint:
  140. X    lint ${SRCS}
  141. X
  142. tags:
  143. X    ctags ${CFILES}
  144. END_OF_FILE
  145. if test 222 -ne `wc -c <'./common/Makefile'`; then
  146.     echo shar: \"'./common/Makefile'\" unpacked with wrong size!
  147. fi
  148. # end of './common/Makefile'
  149. fi
  150. if test -f './common/README.HPUX' -a "${1}" != "-c" ; then 
  151.   echo shar: Will not clobber existing file \"'./common/README.HPUX'\"
  152. else
  153. echo shar: Extracting \"'./common/README.HPUX'\" \(107 characters\)
  154. sed "s/^X//" >'./common/README.HPUX' <<'END_OF_FILE'
  155. X
  156. If you're compiling this under hpux, you'll need to edit
  157. server/Makefile and add
  158. X
  159. X    LIBS = -lbsdipc -lBSD
  160. X
  161. END_OF_FILE
  162. if test 107 -ne `wc -c <'./common/README.HPUX'`; then
  163.     echo shar: \"'./common/README.HPUX'\" unpacked with wrong size!
  164. fi
  165. # end of './common/README.HPUX'
  166. fi
  167. if test -f './common/README.LIB' -a "${1}" != "-c" ; then 
  168.   echo shar: Will not clobber existing file \"'./common/README.LIB'\"
  169. else
  170. echo shar: Extracting \"'./common/README.LIB'\" \(1375 characters\)
  171. sed "s/^X//" >'./common/README.LIB' <<'END_OF_FILE'
  172. X     This directory contains lotsa good stuff common to both
  173. the news server, support, and client programs.  The short of it is:
  174. X
  175. conf.h        Configuration information for NNTP server,
  176. X        support, and client programs.  Described in detail
  177. X        in README in this directory.
  178. X
  179. nntp.h        These are the #define's of the numeric response
  180. X        codes (and other stuff) in NNTP as defined by RFC 977.
  181. X
  182. clientlib.c    This file is a collection of routines which clients
  183. X        can use to talk to the NNTP server.  The code is
  184. X        well documented, but briefly, the functions are
  185. X
  186. X            getserverbyfile    Opens a named file and
  187. X                    returns the contents,
  188. X                    presumed to be a host name
  189. X            server_init    Open connection to server
  190. X            getsocket    Get a stream socket
  191. X            get_server    Get line from server
  192. X            put_server    Send line to server
  193. X            close_server    Close connection
  194. X
  195. X        It is worth noting that these routines use
  196. X        buffered I/O, and leave the external variables
  197. X        "ser_rd_fp" and "ser_wr_fp" (server read/write
  198. X        file pointers, respectively) floating around
  199. X        for use by programs which need them.
  200. X
  201. If you use the clientlib package to build an NNTP client of your
  202. own, you either need to define NNTPSRC on the "cc" command
  203. line when compiling clientlib.c, or add compile-type -D lines to
  204. the "cc" command line for each option.  Defining NNTPSRC will
  205. try to include "../common/conf.h", which should be used if it exists.
  206. END_OF_FILE
  207. if test 1375 -ne `wc -c <'./common/README.LIB'`; then
  208.     echo shar: \"'./common/README.LIB'\" unpacked with wrong size!
  209. fi
  210. # end of './common/README.LIB'
  211. fi
  212. if test -f './common/README.SYSV' -a "${1}" != "-c" ; then 
  213.   echo shar: Will not clobber existing file \"'./common/README.SYSV'\"
  214. else
  215. echo shar: Extracting \"'./common/README.SYSV'\" \(1287 characters\)
  216. sed "s/^X//" >'./common/README.SYSV' <<'END_OF_FILE'
  217. X[This is from Stan Barber, <sob@tmc.edu>.  Thanks, Stan. --Phil]
  218. X
  219. To make nntp run on SYSV, do the following:
  220. X
  221. X1. Get the Berkeley Directory Library emulation package. You can get it
  222. from your nearest comp.sources.unix archive. This is the so-called NDIR 
  223. package. Install it. (If you don't know if you have it, look for the
  224. file ndir.h in /usr/include. If it is there, you have the NDIR library
  225. and can move on the step 2.)
  226. X
  227. X2. Edit common/conf.h. Make sure you define USG and look at all the
  228. other stuff in there to be sure you have defined all the other things
  229. you need. (You will most likely need to define U_LONG, ALONE, vfork,
  230. and FAKESYSLOG. You will most likely need to undefine FASTFORK, BSD_42,
  231. DBM, SUBNET, NETMASK, DAMAGED_NETMASK, and DECNET.) You will probably need to
  232. undefine SYSLOG if you don't define FAKESYSLOG.
  233. X
  234. X3. Edit server/Makefile. Make sure to add -lndir to the LIBS line.
  235. If you have EXCELAN, you will probably need to add a -lsocket here as
  236. well. If the networking include files are not in the "standard location"
  237. X(i.e. /usr/include), be sure to add -Ilocation_of_the_network_include_files
  238. to the CFLAGS line.
  239. X
  240. X4. Now, you can cd to the server directory and type make.
  241. X
  242. If you have problems, send mail to sob@tmc.edu and he will help if he
  243. can.
  244. X
  245. Stan Barber
  246. X
  247. END_OF_FILE
  248. if test 1287 -ne `wc -c <'./common/README.SYSV'`; then
  249.     echo shar: \"'./common/README.SYSV'\" unpacked with wrong size!
  250. fi
  251. # end of './common/README.SYSV'
  252. fi
  253. if test -f './common/clientlib.h' -a "${1}" != "-c" ; then 
  254.   echo shar: Will not clobber existing file \"'./common/clientlib.h'\"
  255. else
  256. echo shar: Extracting \"'./common/clientlib.h'\" \(230 characters\)
  257. sed "s/^X//" >'./common/clientlib.h' <<'END_OF_FILE'
  258. X/*
  259. X * Definitions for NNTP client routines.
  260. X *
  261. X * @(#)clientlib.h    1.1    (Berkeley) 1/9/88
  262. X */
  263. X
  264. extern    char    *getserverbyfile();
  265. extern    int    server_init();
  266. extern    void    put_server();
  267. extern    int    get_server();
  268. extern    void    close_server();
  269. END_OF_FILE
  270. if test 230 -ne `wc -c <'./common/clientlib.h'`; then
  271.     echo shar: \"'./common/clientlib.h'\" unpacked with wrong size!
  272. fi
  273. # end of './common/clientlib.h'
  274. fi
  275. if test -f './common/version.c' -a "${1}" != "-c" ; then 
  276.   echo shar: Will not clobber existing file \"'./common/version.c'\"
  277. else
  278. echo shar: Extracting \"'./common/version.c'\" \(96 characters\)
  279. sed "s/^X//" >'./common/version.c' <<'END_OF_FILE'
  280. X/*
  281. X * Provide the version number of this release.
  282. X */
  283. X
  284. char    nntp_version[] = "1.5 (26 Feb 88)";
  285. END_OF_FILE
  286. if test 96 -ne `wc -c <'./common/version.c'`; then
  287.     echo shar: \"'./common/version.c'\" unpacked with wrong size!
  288. fi
  289. # end of './common/version.c'
  290. fi
  291. if test ! -d './doc' ; then
  292.     echo shar: Creating directory \"'./doc'\"
  293.     mkdir './doc'
  294. fi
  295. if test -f './doc/Makefile' -a "${1}" != "-c" ; then 
  296.   echo shar: Will not clobber existing file \"'./doc/Makefile'\"
  297. else
  298. echo shar: Extracting \"'./doc/Makefile'\" \(990 characters\)
  299. sed "s/^X//" >'./doc/Makefile' <<'END_OF_FILE'
  300. X#
  301. X# Makefile for manual pages for nntp service
  302. X#
  303. X# Created by Stan Barber; Mon Apr  6 13:25:27 CDT 1987
  304. X#
  305. X
  306. X# change these to suit your system
  307. ROFF    = ditroff
  308. PRINTER    = lw301
  309. MANDIR    = /usr/man
  310. X
  311. X# from here down should be constant
  312. SHELL    = /bin/sh
  313. MACROS    = -man
  314. MANPAGES= nntpd.8c mkgrdates.8c getactive.1
  315. EXTRACT    = ./config.sh
  316. X
  317. all: $(MANPAGES)
  318. X    @echo "Done"
  319. X
  320. nntpd.8c: nntpd.dst $(EXTRACT)
  321. X    $(EXTRACT) nntpd.dst nntpd.8c
  322. X
  323. mkgrdates.8c: mkgrdates.dst $(EXTRACT)
  324. X    $(EXTRACT) mkgrdates.dst mkgrdates.8c
  325. X
  326. getactive.1: getactive.dst $(EXTRACT)
  327. X    $(EXTRACT) getactive.dst getactive.1
  328. X
  329. install: $(MANPAGES)
  330. X    mv nntpd.8c $(MANDIR)/man8/nntpd.8c
  331. X    mv mkgrdates.8c $(MANDIR)/man8/mkgrdates.8c
  332. X    mv getactive.1 $(MANDIR)/man1/getactive.1
  333. X    mv nntpxmit.1 $(MANDIR)/man1/nntpxmit.1
  334. X
  335. print: $(MANPAGES)
  336. X    $(ROFF) $(MACROS) -P$(PRINTER) nntpd.8c
  337. X    $(ROFF) $(MACROS) -P$(PRINTER) mkgrdates.8c
  338. X    $(ROFF) $(MACROS) -P$(PRINTER) getactive.1
  339. X
  340. clean:
  341. X    -rm -f $(MANPAGES)
  342. X
  343. distrib: clean
  344. X    rm -rf SCCS
  345. X
  346. check:
  347. X    sccs check
  348. END_OF_FILE
  349. if test 990 -ne `wc -c <'./doc/Makefile'`; then
  350.     echo shar: \"'./doc/Makefile'\" unpacked with wrong size!
  351. fi
  352. # end of './doc/Makefile'
  353. fi
  354. if test -f './doc/README' -a "${1}" != "-c" ; then 
  355.   echo shar: Will not clobber existing file \"'./doc/README'\"
  356. else
  357. echo shar: Extracting \"'./doc/README'\" \(379 characters\)
  358. sed "s/^X//" >'./doc/README' <<'END_OF_FILE'
  359. X
  360. X[A README file for a doc directory?  Yow...]
  361. X
  362. Manual pages are in the *.dst files.  Because some manual pages contain
  363. site-dependent things (e.g., path name references for the news lib
  364. directory, etc.), you should customize the file "config.sh".
  365. X
  366. Once you've done that (look at config.sh -- it's self explanatory),
  367. type "make".
  368. X
  369. The RFC describing the protocol is in "rfc977".
  370. X
  371. END_OF_FILE
  372. if test 379 -ne `wc -c <'./doc/README'`; then
  373.     echo shar: \"'./doc/README'\" unpacked with wrong size!
  374. fi
  375. # end of './doc/README'
  376. fi
  377. if test -f './doc/getactive.dst' -a "${1}" != "-c" ; then 
  378.   echo shar: Will not clobber existing file \"'./doc/getactive.dst'\"
  379. else
  380. echo shar: Extracting \"'./doc/getactive.dst'\" \(1024 characters\)
  381. sed "s/^X//" >'./doc/getactive.dst' <<'END_OF_FILE'
  382. X.\"
  383. X.\" @(#)getactive.dst    1.2    (Berkeley) 10/15/87
  384. X.\"
  385. X.TH GETACTIVE 1 "8 July 1987"
  386. X.UC 4
  387. X.SH NAME
  388. getactive \- retrieve the active file from the remote news server
  389. X.SH SYNOPSIS
  390. X.B RNLIB/getactive filename
  391. X.SH DESCRIPTION
  392. X.I Getactive
  393. retrieves the newsgroup ``active file'' (which contains
  394. the list of all known newsgroups and their high/low message
  395. numbers) from the news server on a remote machine and
  396. places it in
  397. X.I filename.
  398. X.PP
  399. The normal use is in support of shell scripts (such as
  400. X.I newsgroups
  401. or
  402. X.I newsetup )
  403. which have been taken from existing software, such
  404. as
  405. X.I rn.
  406. When used in such scripts, the active file is usually
  407. retrieved into a temporary file such as
  408. X.IR /tmp/active.$$ ,
  409. and should be deleted before the shell script exits.
  410. X.PP
  411. The active file is retrieved from the machine
  412. listed in the file SERVERFILE, which is
  413. defined by the constant
  414. SERVER_FILE in
  415. X.I common/conf.h
  416. in thef NNTP source directory.
  417. The environment variable NNTPSERVER can be used to
  418. override this choice.
  419. X.SH AUTHOR
  420. Phil Lapsley
  421. END_OF_FILE
  422. if test 1024 -ne `wc -c <'./doc/getactive.dst'`; then
  423.     echo shar: \"'./doc/getactive.dst'\" unpacked with wrong size!
  424. fi
  425. # end of './doc/getactive.dst'
  426. fi
  427. if test ! -d './inews' ; then
  428.     echo shar: Creating directory \"'./inews'\"
  429.     mkdir './inews'
  430. fi
  431. if test -f './inews/Makefile' -a "${1}" != "-c" ; then 
  432.   echo shar: Will not clobber existing file \"'./inews/Makefile'\"
  433. else
  434. echo shar: Extracting \"'./inews/Makefile'\" \(812 characters\)
  435. sed "s/^X//" >'./inews/Makefile' <<'END_OF_FILE'
  436. X#
  437. X# Makefile for pseudo-inews
  438. X#
  439. X
  440. SRCS    =    inews.c uname.c ../common/clientlib.c ../common/version.c
  441. OBJS    =    inews.o uname.o ../common/clientlib.o ../common/version.o
  442. HFILES    =    ../common/nntp.h ../common/conf.h
  443. X
  444. CFLAGS    = -O
  445. X
  446. DESTDIR    = /usr/local
  447. X
  448. inews:  $(OBJS) $(HFILES)
  449. X    $(CC) $(CFLAGS) $(OBJS) -o inews
  450. X
  451. uname.o: ../common/conf.h
  452. X
  453. X../common/clientlib.o:
  454. X    ${CC} ${CFLAGS} -DNNTPSRC -c ../common/clientlib.c
  455. X    mv clientlib.o ../common/clientlib.o
  456. X
  457. X../common/version.o:
  458. X    ${CC} ${CFLAGS} -c ../common/version.c
  459. X    mv version.o ../common/version.o
  460. X
  461. install: inews
  462. X    cp inews ${DESTDIR}/inews
  463. X    chmod 755 ${DESTDIR}/inews
  464. X
  465. clean:
  466. X    -rm -f ${OBJS} inews make*.out
  467. X
  468. distrib: clean
  469. X    rm -f make.out
  470. X    rm -rf SCCS
  471. X
  472. check:
  473. X    sccs check
  474. X    sccs prt -y *.[ch] > /dev/null
  475. X
  476. lint:
  477. X    lint ${SRCS} ${HFILES}
  478. X
  479. tags:
  480. X    ctags $(CFILES) $(HFILES)
  481. END_OF_FILE
  482. if test 812 -ne `wc -c <'./inews/Makefile'`; then
  483.     echo shar: \"'./inews/Makefile'\" unpacked with wrong size!
  484. fi
  485. # end of './inews/Makefile'
  486. fi
  487. if test -f './inews/test' -a "${1}" != "-c" ; then 
  488.   echo shar: Will not clobber existing file \"'./inews/test'\"
  489. else
  490. echo shar: Extracting \"'./inews/test'\" \(177 characters\)
  491. sed "s/^X//" >'./inews/test' <<'END_OF_FILE'
  492. Path: ucbingres!grady
  493. From: grady@ucbnug.ARPA
  494. Subject: testola
  495. Newsgroups: ucb.test
  496. Distribution: ucb
  497. Follow-up: ucb.test
  498. Extra-entry: and another thing..
  499. X
  500. bnug, dude.
  501. X.
  502. yeah..
  503. END_OF_FILE
  504. if test 177 -ne `wc -c <'./inews/test'`; then
  505.     echo shar: \"'./inews/test'\" unpacked with wrong size!
  506. fi
  507. # end of './inews/test'
  508. fi
  509. if test -f './inews/test1' -a "${1}" != "-c" ; then 
  510.   echo shar: Will not clobber existing file \"'./inews/test1'\"
  511. else
  512. echo shar: Extracting \"'./inews/test1'\" \(187 characters\)
  513. sed "s/^X//" >'./inews/test1' <<'END_OF_FILE'
  514. Path: ucbdean!phil
  515. From: phil@ucbdean.BERKELEY.EDU
  516. Subject: testosterone
  517. Newsgroups: ucb.test
  518. Distribution: ucb
  519. Follow-up: ucb.test
  520. Extra-entry: and another thing..
  521. X
  522. bnug, dude.
  523. X.
  524. yeah..
  525. END_OF_FILE
  526. if test 187 -ne `wc -c <'./inews/test1'`; then
  527.     echo shar: \"'./inews/test1'\" unpacked with wrong size!
  528. fi
  529. # end of './inews/test1'
  530. fi
  531. if test -f './inews/test2' -a "${1}" != "-c" ; then 
  532.   echo shar: Will not clobber existing file \"'./inews/test2'\"
  533. else
  534. echo shar: Extracting \"'./inews/test2'\" \(197 characters\)
  535. sed "s/^X//" >'./inews/test2' <<'END_OF_FILE'
  536. Subject: test of remote inews posting
  537. Newsgroups: ucb.test
  538. Distribution: ucb
  539. Follow-up: ucb.test
  540. Extra-entry: and another thing..
  541. X
  542. X$NAME has an & in it; does full name above?
  543. X
  544. bnug, dude.
  545. X.
  546. yeah..
  547. END_OF_FILE
  548. if test 197 -ne `wc -c <'./inews/test2'`; then
  549.     echo shar: \"'./inews/test2'\" unpacked with wrong size!
  550. fi
  551. # end of './inews/test2'
  552. fi
  553. if test ! -d './rrnpatches' ; then
  554.     echo shar: Creating directory \"'./rrnpatches'\"
  555.     mkdir './rrnpatches'
  556. fi
  557. if test -f './rrnpatches/MAKE_RRN_CHANGES' -a "${1}" != "-c" ; then 
  558.   echo shar: Will not clobber existing file \"'./rrnpatches/MAKE_RRN_CHANGES'\"
  559. else
  560. echo shar: Extracting \"'./rrnpatches/MAKE_RRN_CHANGES'\" \(313 characters\)
  561. sed "s/^X//" >'./rrnpatches/MAKE_RRN_CHANGES' <<'END_OF_FILE'
  562. X#!/bin/sh
  563. X
  564. PATH=/usr/ucb:/usr/bin:/bin:/usr/local/bin:/usr/local
  565. export PATH
  566. X
  567. for filename in Configure Makefile.SH Pnews.SH Rnmail.SH addng.c \
  568. X    artio.c common.h final.c head.c init.c newsetup.SH newsgroups.SH \
  569. X    ng.c ngdata.c ngdata.h rcstuff.c respond.c term.c util.c
  570. do
  571. patch $filename < ${filename}.pat
  572. done
  573. END_OF_FILE
  574. if test 313 -ne `wc -c <'./rrnpatches/MAKE_RRN_CHANGES'`; then
  575.     echo shar: \"'./rrnpatches/MAKE_RRN_CHANGES'\" unpacked with wrong size!
  576. fi
  577. chmod +x './rrnpatches/MAKE_RRN_CHANGES'
  578. # end of './rrnpatches/MAKE_RRN_CHANGES'
  579. fi
  580. if test -f './rrnpatches/Pnews.SH.pat' -a "${1}" != "-c" ; then 
  581.   echo shar: Will not clobber existing file \"'./rrnpatches/Pnews.SH.pat'\"
  582. else
  583. echo shar: Extracting \"'./rrnpatches/Pnews.SH.pat'\" \(1205 characters\)
  584. sed "s/^X//" >'./rrnpatches/Pnews.SH.pat' <<'END_OF_FILE'
  585. X*** rn/Pnews.SH    Sun Mar 15 19:54:30 1987
  586. X--- rrn/Pnews.SH    Sun Mar 15 23:55:35 1987
  587. X***************
  588. X*** 39,44
  589. X  define)
  590. X  # your site name
  591. X  sitename=\`$hostcmd\`
  592. X  # where recordings, distributions and moderators are kept
  593. X  lib=\`$filexp $lib\`
  594. X  # where important rn things are kept
  595. X
  596. X--- 39,51 -----
  597. X  define)
  598. X  # your site name
  599. X  sitename=\`$hostcmd\`
  600. X+ case \$sitename in
  601. X+     *.*)
  602. X+         ;;
  603. X+     *)
  604. X+         sitename=\${sitename}.$domain
  605. X+         ;;
  606. X+ esac
  607. X  # where recordings, distributions and moderators are kept
  608. X  lib=\`$filexp $lib\`
  609. X  # where important rn things are kept
  610. X***************
  611. X*** 630,635
  612. X  esac
  613. X  
  614. X  $cat > $tmpart <<EOHeader
  615. X  Newsgroups: $ng
  616. X  Subject: $title
  617. X  Expires: 
  618. X
  619. X--- 637,644 -----
  620. X  esac
  621. X  
  622. X  $cat > $tmpart <<EOHeader
  623. X+ From: $logname@$sitename ($fullname)
  624. X+ Path: $sitename!$logname
  625. X  Newsgroups: $ng
  626. X  Subject: $title
  627. X  Expires: 
  628. X***************
  629. X*** 635,641
  630. X  Expires: 
  631. X  References: 
  632. X  Sender: 
  633. X! Reply-To: $logname@$sitename.UUCP ($fullname)
  634. X  Followup-To: $follow
  635. X  Distribution: $dist
  636. X  Organization: $orgname
  637. X
  638. X--- 644,650 -----
  639. X  Expires: 
  640. X  References: 
  641. X  Sender: 
  642. X! Reply-To: $logname@$sitename ($fullname)
  643. X  Followup-To: $follow
  644. X  Distribution: $dist
  645. X  Organization: $orgname
  646. END_OF_FILE
  647. if test 1205 -ne `wc -c <'./rrnpatches/Pnews.SH.pat'`; then
  648.     echo shar: \"'./rrnpatches/Pnews.SH.pat'\" unpacked with wrong size!
  649. fi
  650. # end of './rrnpatches/Pnews.SH.pat'
  651. fi
  652. if test -f './rrnpatches/README_RRN' -a "${1}" != "-c" ; then 
  653.   echo shar: Will not clobber existing file \"'./rrnpatches/README_RRN'\"
  654. else
  655. echo shar: Extracting \"'./rrnpatches/README_RRN'\" \(812 characters\)
  656. sed "s/^X//" >'./rrnpatches/README_RRN' <<'END_OF_FILE'
  657. Updated hacks to change rn into rrn    25 Feb 1988
  658. X
  659. Everything is now automated to install the changes.  There may
  660. be some breakage if you apply these patches and don't want things
  661. built as rrn, since I haven't tested that at all.  In summary,
  662. apply these patches only if you want rrn.  [Sorry, Gene, for
  663. botching this.]
  664. X
  665. To apply: copy this directory into a COPY of your rn #39 source.
  666. Then type "MAKE_RRN_CHANGES".  You should now be able to run
  667. Configure as usual.
  668. X
  669. X[The original patches and the MAKE_RRN_CHANGES script were the original
  670. work of Gene Spafford.  However, the current version of rrn, #39, is not
  671. up to snuff and you can't quite have both the rrn and rn version live in
  672. the same directory.  The blame for this rests on my shoulders.
  673. BTW, rn version 39 is available on ucbvax.berkeley.edu.  --Phil]
  674. END_OF_FILE
  675. if test 812 -ne `wc -c <'./rrnpatches/README_RRN'`; then
  676.     echo shar: \"'./rrnpatches/README_RRN'\" unpacked with wrong size!
  677. fi
  678. # end of './rrnpatches/README_RRN'
  679. fi
  680. if test -f './rrnpatches/Rnmail.SH.pat' -a "${1}" != "-c" ; then 
  681.   echo shar: Will not clobber existing file \"'./rrnpatches/Rnmail.SH.pat'\"
  682. else
  683. echo shar: Extracting \"'./rrnpatches/Rnmail.SH.pat'\" \(519 characters\)
  684. sed "s/^X//" >'./rrnpatches/Rnmail.SH.pat' <<'END_OF_FILE'
  685. X*** rn/Rnmail.SH    Sun Mar 15 19:54:38 1987
  686. X--- rrn/Rnmail.SH    Mon Mar 16 09:15:08 1987
  687. X***************
  688. X*** 36,42
  689. X  
  690. X  # your site name
  691. X  case $portable in
  692. X! define) sitename=\`$hostcmd\` ;;
  693. X  undef) sitename="$sitename" ;;
  694. X  esac
  695. X  # your organization name
  696. X
  697. X--- 36,51 -----
  698. X  
  699. X  # your site name
  700. X  case $portable in
  701. X! define)
  702. X!     sitename=\`$hostcmd\`
  703. X!     case \$sitename in
  704. X!         *.*)
  705. X!             ;;
  706. X!         *)
  707. X!             sitename=\${sitename}.$domain
  708. X!             ;;
  709. X!     esac
  710. X!     ;;
  711. X  undef) sitename="$sitename" ;;
  712. X  esac
  713. X  # your organization name
  714. END_OF_FILE
  715. if test 519 -ne `wc -c <'./rrnpatches/Rnmail.SH.pat'`; then
  716.     echo shar: \"'./rrnpatches/Rnmail.SH.pat'\" unpacked with wrong size!
  717. fi
  718. # end of './rrnpatches/Rnmail.SH.pat'
  719. fi
  720. if test -f './rrnpatches/addng.c.pat' -a "${1}" != "-c" ; then 
  721.   echo shar: Will not clobber existing file \"'./rrnpatches/addng.c.pat'\"
  722. else
  723. echo shar: Extracting \"'./rrnpatches/addng.c.pat'\" \(1113 characters\)
  724. sed "s/^X//" >'./rrnpatches/addng.c.pat' <<'END_OF_FILE'
  725. X*** rn/addng.c    Sun Mar 15 19:54:42 1987
  726. X--- rrn/addng.c    Sun Mar 15 20:10:54 1987
  727. X***************
  728. X*** 1,3
  729. X  /* $Header: addng.c,v 4.3.1.2 85/05/29 09:06:24 lwall Exp $
  730. X   *
  731. X   * $Log:    addng.c,v $
  732. X
  733. X--- 1,7 -----
  734. X+ /*
  735. X+  * Hacked for rrn
  736. X+  */
  737. X+ 
  738. X  /* $Header: addng.c,v 4.3.1.2 85/05/29 09:06:24 lwall Exp $
  739. X   *
  740. X   * $Log:    addng.c,v $
  741. X***************
  742. X*** 109,114
  743. X      char tst[128];
  744. X      long time();
  745. X   
  746. X      sprintf(tst, ngsize ? "%s/%s/1" : "%s/%s" ,spool,getngdir(ngnam));
  747. X      if (stat(tst,&filestat) < 0)
  748. X      return (ngsize ? 0L : time(Null(long *)));
  749. X
  750. X--- 113,124 -----
  751. X      char tst[128];
  752. X      long time();
  753. X   
  754. X+ #ifdef SERVER
  755. X+ 
  756. X+     return (ngsize < 2 ? time(0) : 0);
  757. X+ 
  758. X+ #else not SERVER
  759. X+ 
  760. X      sprintf(tst, ngsize ? "%s/%s/1" : "%s/%s" ,spool,getngdir(ngnam));
  761. X      if (stat(tst,&filestat) < 0)
  762. X      return (ngsize ? 0L : time(Null(long *)));
  763. X***************
  764. X*** 115,120
  765. X      /* not there, assume something good */
  766. X      else
  767. X      return filestat.st_mtime;
  768. X  }
  769. X  
  770. X  bool
  771. X
  772. X--- 125,132 -----
  773. X      /* not there, assume something good */
  774. X      else
  775. X      return filestat.st_mtime;
  776. X+ 
  777. X+ #endif
  778. X  }
  779. X  
  780. X  bool
  781. END_OF_FILE
  782. if test 1113 -ne `wc -c <'./rrnpatches/addng.c.pat'`; then
  783.     echo shar: \"'./rrnpatches/addng.c.pat'\" unpacked with wrong size!
  784. fi
  785. # end of './rrnpatches/addng.c.pat'
  786. fi
  787. if test -f './rrnpatches/final.c.pat' -a "${1}" != "-c" ; then 
  788.   echo shar: Will not clobber existing file \"'./rrnpatches/final.c.pat'\"
  789. else
  790. echo shar: Extracting \"'./rrnpatches/final.c.pat'\" \(1178 characters\)
  791. sed "s/^X//" >'./rrnpatches/final.c.pat' <<'END_OF_FILE'
  792. X*** rn/final.c    Sun Mar 15 19:54:39 1987
  793. X--- rrn/final.c    Mon Jul 13 15:48:50 1987
  794. X***************
  795. X*** 15,20
  796. X  #include "bits.h"
  797. X  #include "last.h"
  798. X  #include "rcstuff.h"
  799. X  #include "INTERN.h"
  800. X  #include "final.h"
  801. X  
  802. X
  803. X--- 15,22 -----
  804. X  #include "bits.h"
  805. X  #include "last.h"
  806. X  #include "rcstuff.h"
  807. X+ #include "ngdata.h"
  808. X+ #include "artio.h"
  809. X  #include "INTERN.h"
  810. X  #include "final.h"
  811. X  
  812. X***************
  813. X*** 51,56
  814. X  finalize(status)
  815. X  int status;
  816. X  {
  817. X      if (bizarre)
  818. X      resetty();
  819. X      UNLINK(lockname);
  820. X
  821. X--- 53,62 -----
  822. X  finalize(status)
  823. X  int status;
  824. X  {
  825. X+ #ifdef SERVER
  826. X+     char artname[32];
  827. X+ #endif SERVER
  828. X+ 
  829. X      if (bizarre)
  830. X      resetty();
  831. X      UNLINK(lockname);
  832. X***************
  833. X*** 54,59
  834. X      if (bizarre)
  835. X      resetty();
  836. X      UNLINK(lockname);
  837. X      if (status < 0) {
  838. X      chdir("/usr/tmp");
  839. X      sigset(SIGILL,SIG_DFL);
  840. X
  841. X--- 60,73 -----
  842. X      if (bizarre)
  843. X      resetty();
  844. X      UNLINK(lockname);
  845. X+ #ifdef SERVER
  846. X+     if (openart > 0) {
  847. X+     sprintf(artname, "/tmp/rrn%ld.%ld", openart, getpid());
  848. X+         UNLINK(artname);
  849. X+     }
  850. X+     UNLINK(active_name);
  851. X+     close_server();
  852. X+ #endif SERVER
  853. X      if (status < 0) {
  854. X      chdir("/usr/tmp");
  855. X      sigset(SIGILL,SIG_DFL);
  856. END_OF_FILE
  857. if test 1178 -ne `wc -c <'./rrnpatches/final.c.pat'`; then
  858.     echo shar: \"'./rrnpatches/final.c.pat'\" unpacked with wrong size!
  859. fi
  860. # end of './rrnpatches/final.c.pat'
  861. fi
  862. if test -f './rrnpatches/newsgroups.SH.pat' -a "${1}" != "-c" ; then 
  863.   echo shar: Will not clobber existing file \"'./rrnpatches/newsgroups.SH.pat'\"
  864. else
  865. echo shar: Extracting \"'./rrnpatches/newsgroups.SH.pat'\" \(1341 characters\)
  866. sed "s/^X//" >'./rrnpatches/newsgroups.SH.pat' <<'END_OF_FILE'
  867. X*** rn/newsgroups.SH    Sun Mar 15 19:54:46 1987
  868. X--- rrn/newsgroups.SH    Thu Feb 25 20:35:38 1988
  869. X***************
  870. X*** 1,5
  871. X  case $CONFIG in
  872. X!     '') . config.sh ;;
  873. X  esac
  874. X  echo "Extracting newsgroups (with variable substitutions)"
  875. X  $spitshell >newsgroups <<!GROK!THIS!
  876. X
  877. X--- 1,5 -----
  878. X  case $CONFIG in
  879. X!     '') . ./config.sh ;;
  880. X  esac
  881. X  echo "Extracting newsgroups (with variable substitutions)"
  882. X  $spitshell >newsgroups <<!GROK!THIS!
  883. X***************
  884. X*** 20,26
  885. X  : You might want to change pager to a "make column" program if you have one.
  886. X  : On the other hand, if your kernel does paging, cat would probably do.
  887. X  pager="${pager-/usr/ucb/more}"
  888. X! active="${active-/usr/lib/news/active}"
  889. X  
  890. X  : End of system dependencies, hopefully
  891. X  
  892. X
  893. X--- 20,26 -----
  894. X  : You might want to change pager to a "make column" program if you have one.
  895. X  : On the other hand, if your kernel does paging, cat would probably do.
  896. X  pager="${pager-/usr/ucb/more}"
  897. X! active="/tmp/active.\$\$"
  898. X  
  899. X  : End of system dependencies, hopefully
  900. X  
  901. X***************
  902. X*** 24,32
  903. X  
  904. X  : End of system dependencies, hopefully
  905. X  
  906. X! case \$active in
  907. X! ~*) active=\`$filexp \$active\` ;;
  908. X! esac
  909. X  
  910. X  if $test \$# -ge 2 ; then
  911. X      pager=$cat
  912. X
  913. X--- 24,30 -----
  914. X  
  915. X  : End of system dependencies, hopefully
  916. X  
  917. X! $rnlib/getactive \$active
  918. X  
  919. X  if $test \$# -ge 2 ; then
  920. X      pager=$cat
  921. END_OF_FILE
  922. if test 1341 -ne `wc -c <'./rrnpatches/newsgroups.SH.pat'`; then
  923.     echo shar: \"'./rrnpatches/newsgroups.SH.pat'\" unpacked with wrong size!
  924. fi
  925. # end of './rrnpatches/newsgroups.SH.pat'
  926. fi
  927. if test -f './rrnpatches/ngdata.h.pat' -a "${1}" != "-c" ; then 
  928.   echo shar: Will not clobber existing file \"'./rrnpatches/ngdata.h.pat'\"
  929. else
  930. echo shar: Extracting \"'./rrnpatches/ngdata.h.pat'\" \(635 characters\)
  931. sed "s/^X//" >'./rrnpatches/ngdata.h.pat' <<'END_OF_FILE'
  932. X*** rn/ngdata.h    Sun Mar 15 19:54:52 1987
  933. X--- rrn/ngdata.h    Sun Mar 15 22:37:32 1987
  934. X***************
  935. X*** 10,15
  936. X  EXT bool writesoft INIT(FALSE);    /* rewrite the soft pointer file? */
  937. X  EXT int softtries INIT(0), softmisses INIT(0);
  938. X  
  939. X  #ifdef CACHEFIRST
  940. X      EXT ART_NUM abs1st[MAXRCLINE];    /* 1st real article in newsgroup */
  941. X  #else
  942. X
  943. X--- 10,19 -----
  944. X  EXT bool writesoft INIT(FALSE);    /* rewrite the soft pointer file? */
  945. X  EXT int softtries INIT(0), softmisses INIT(0);
  946. X  
  947. X+ #ifdef SERVER
  948. X+     EXT char active_name[256];
  949. X+ #endif
  950. X+ 
  951. X  #ifdef CACHEFIRST
  952. X      EXT ART_NUM abs1st[MAXRCLINE];    /* 1st real article in newsgroup */
  953. X  #else
  954. END_OF_FILE
  955. if test 635 -ne `wc -c <'./rrnpatches/ngdata.h.pat'`; then
  956.     echo shar: \"'./rrnpatches/ngdata.h.pat'\" unpacked with wrong size!
  957. fi
  958. # end of './rrnpatches/ngdata.h.pat'
  959. fi
  960. if test -f './rrnpatches/term.c.pat' -a "${1}" != "-c" ; then 
  961.   echo shar: Will not clobber existing file \"'./rrnpatches/term.c.pat'\"
  962. else
  963. echo shar: Extracting \"'./rrnpatches/term.c.pat'\" \(844 characters\)
  964. sed "s/^X//" >'./rrnpatches/term.c.pat' <<'END_OF_FILE'
  965. X*** rn/term.c    Sun Mar 15 19:54:29 1987
  966. X--- rrn/term.c    Wed Aug 19 21:37:40 1987
  967. X***************
  968. X*** 190,195
  969. X      }
  970. X      LINES = tgetnum("li");        /* lines per page */
  971. X      COLS = tgetnum("co");        /* columns on page */
  972. X      AM = tgetflag("am");        /* terminal wraps automatically? */
  973. X      XN = tgetflag("xn");        /* then eats next newline? */
  974. X      VB = Tgetstr("vb");
  975. X
  976. X--- 190,205 -----
  977. X      }
  978. X      LINES = tgetnum("li");        /* lines per page */
  979. X      COLS = tgetnum("co");        /* columns on page */
  980. X+ 
  981. X+ #ifdef TIOCGWINSZ
  982. X+     { struct winsize ws;
  983. X+     if (ioctl(0, TIOCGWINSZ, &ws) >= 0 && ws.ws_row > 0 && ws.ws_col > 0) {
  984. X+         LINES = ws.ws_row;
  985. X+         COLS = ws.ws_col;
  986. X+     }
  987. X+     }
  988. X+ #endif
  989. X+     
  990. X      AM = tgetflag("am");        /* terminal wraps automatically? */
  991. X      XN = tgetflag("xn");        /* then eats next newline? */
  992. X      VB = Tgetstr("vb");
  993. END_OF_FILE
  994. if test 844 -ne `wc -c <'./rrnpatches/term.c.pat'`; then
  995.     echo shar: \"'./rrnpatches/term.c.pat'\" unpacked with wrong size!
  996. fi
  997. # end of './rrnpatches/term.c.pat'
  998. fi
  999. if test -f './rrnpatches/util.c.pat' -a "${1}" != "-c" ; then 
  1000.   echo shar: Will not clobber existing file \"'./rrnpatches/util.c.pat'\"
  1001. else
  1002. echo shar: Extracting \"'./rrnpatches/util.c.pat'\" \(676 characters\)
  1003. sed "s/^X//" >'./rrnpatches/util.c.pat' <<'END_OF_FILE'
  1004. X*** rn/util.c    Sun Mar 15 19:54:32 1987
  1005. X--- rrn/util.c    Sun Mar 15 20:50:30 1987
  1006. X***************
  1007. X*** 45,50
  1008. X      else if ((shell = getenv("SHELL")) == Nullch || !*shell)
  1009. X      shell = PREFSHELL;
  1010. X      if ((pid = vfork()) == 0) {
  1011. X      if (*s)
  1012. X          execl(shell, shell, "-c", s, Nullch);
  1013. X      else
  1014. X
  1015. X--- 45,59 -----
  1016. X      else if ((shell = getenv("SHELL")) == Nullch || !*shell)
  1017. X      shell = PREFSHELL;
  1018. X      if ((pid = vfork()) == 0) {
  1019. X+ #ifdef SERVER
  1020. X+         int i;
  1021. X+ 
  1022. X+     /* This is necessary to keep bourne shell from puking */
  1023. X+ 
  1024. X+         for (i = 3; i < 10; ++i)
  1025. X+                 (void) close(i);
  1026. X+ #endif SERVER
  1027. X+ 
  1028. X      if (*s)
  1029. X          execl(shell, shell, "-c", s, Nullch);
  1030. X      else
  1031. END_OF_FILE
  1032. if test 676 -ne `wc -c <'./rrnpatches/util.c.pat'`; then
  1033.     echo shar: \"'./rrnpatches/util.c.pat'\" unpacked with wrong size!
  1034. fi
  1035. # end of './rrnpatches/util.c.pat'
  1036. fi
  1037. if test ! -d './server' ; then
  1038.     echo shar: Creating directory \"'./server'\"
  1039.     mkdir './server'
  1040. fi
  1041. if test -f './server/Makefile' -a "${1}" != "-c" ; then 
  1042.   echo shar: Will not clobber existing file \"'./server/Makefile'\"
  1043. else
  1044. echo shar: Extracting \"'./server/Makefile'\" \(1342 characters\)
  1045. sed "s/^X//" >'./server/Makefile' <<'END_OF_FILE'
  1046. X#
  1047. X# Makefile for NNTP server
  1048. X#
  1049. X
  1050. SRVROBJ = main.o serve.o access.o access_inet.o access_dnet.o active.o \
  1051. X    ahbs.o globals.o group.o help.o ihave.o list.o misc.o netaux.o \
  1052. X    newgroups.o newnews.o nextlast.o ngmatch.o post.o parsit.o scandir.o \
  1053. X    slave.o spawn.o strcasecmp.o subnet.o time.o xhdr.o fakesyslog.o \
  1054. X    ../common/version.o
  1055. X
  1056. SRVRSRC = main.c serve.c access.c access_inet.c access_dnet.c active.c \
  1057. X    ahbs.c globals.c group.c help.c ihave.c list.c misc.c netaux.c \
  1058. X    newgroups.c newnews.c nextlast.c ngmatch.c post.c parsit.c scandir.c \
  1059. X    slave.c spawn.c strcasecmp.c subnet.c time.c xhdr.c fakesyslog.c \
  1060. X    ../common/version.c
  1061. X
  1062. SRVRINC = common.h ../common/conf.h ../common/nntp.h
  1063. X
  1064. SRCS    = ${SRVRSRC}
  1065. X
  1066. X# -ldbm here if you've #define'ed DBM in ../common/conf.h
  1067. LIBS    =
  1068. X
  1069. CFLAGS    = -O
  1070. X
  1071. X# Where nntpd is going to live
  1072. X
  1073. DESTDIR    = /etc
  1074. X
  1075. all:    nntpd
  1076. X
  1077. nntpd: ${SRVROBJ} ${SRVRINC}
  1078. X    ${CC} ${CFLAGS} -o nntpd ${SRVROBJ} ${LIBS}
  1079. X
  1080. X${SRVROBJ}: ${SRVRINC}
  1081. X
  1082. install: nntpd
  1083. X    cp nntpd ${DESTDIR}/nntpd
  1084. X    chmod 711 ${DESTDIR}/nntpd
  1085. X
  1086. lint:
  1087. X    lint ${SRVRSRC}
  1088. X
  1089. clean:
  1090. X    -rm -f *.o nntpd make*.out a.out
  1091. X
  1092. distrib: clean
  1093. X    rm -rf SCCS save tags
  1094. X
  1095. check:
  1096. X    sccs check
  1097. X    sccs prt -y *.[ch] > /dev/null
  1098. X
  1099. tags:    ${SRVRSRC} ${SRVRINC}
  1100. X    ctags ${SRVRSRC} ${SRVRINC}
  1101. X
  1102. X# Dependencies
  1103. X
  1104. X../common/version.o:
  1105. X    ${CC} ${CFLAGS} -c ../common/version.c
  1106. X    mv version.o ../common/version.o
  1107. END_OF_FILE
  1108. if test 1342 -ne `wc -c <'./server/Makefile'`; then
  1109.     echo shar: \"'./server/Makefile'\" unpacked with wrong size!
  1110. fi
  1111. # end of './server/Makefile'
  1112. fi
  1113. if test -f './server/access_dnet.c' -a "${1}" != "-c" ; then 
  1114.   echo shar: Will not clobber existing file \"'./server/access_dnet.c'\"
  1115. else
  1116. echo shar: Extracting \"'./server/access_dnet.c'\" \(1413 characters\)
  1117. sed "s/^X//" >'./server/access_dnet.c' <<'END_OF_FILE'
  1118. X#include <sys/types.h>
  1119. X#include <sys/socket.h>
  1120. X#include <sys/types.h>
  1121. X
  1122. X#include "common.h"
  1123. X
  1124. X#ifdef DECNET
  1125. X
  1126. X#ifndef lint
  1127. static    char    *sccsid = "@(#)access_dnet.c    1.6    (Berkeley) 1/9/88";
  1128. X#endif
  1129. X
  1130. X
  1131. X/*
  1132. X * dnet_netnames -- return the network, subnet, and host names of
  1133. X * our peer process for the DECnet domain.  Since DECnet doesn't
  1134. X * have subnets, we always return "subnet_name"'s first char as '\0';
  1135. X *
  1136. X *    Parameters:    "sock" is the socket connect to our peer.
  1137. X *            "sap" is a pointer to the result of
  1138. X *            a getpeername() call.
  1139. X *            "net_name", "subnet_name", and "host_name"
  1140. X *            are filled in by this routine with the
  1141. X *            corresponding ASCII names of our peer.
  1142. X *    Returns:    Nothing.
  1143. X *    Side effects:    None.
  1144. X */
  1145. X
  1146. dnet_netnames(sock, sap, net_name, subnet_name, host_name)
  1147. X    int        sock;
  1148. X    struct sockaddr    *sap;
  1149. X    char        *net_name;
  1150. X    char        *subnet_name;
  1151. X    char        *host_name;
  1152. X{
  1153. X    char        *cp;
  1154. X    struct linger    l;
  1155. X    char        *getenv();
  1156. X
  1157. X    cp = getenv("NETWORK");
  1158. X    (void) strcpy(net_name, cp ? cp : "DECnet");
  1159. X
  1160. X    cp = getenv("REMNODE");
  1161. X    (void) strcpy(host_name, cp ? cp : "unknown");
  1162. X
  1163. X    *subnet_name = '\0';
  1164. X
  1165. X    /*
  1166. X     * Give decnet a chance to flush its buffers before the
  1167. X      * link is killed.
  1168. X     */
  1169. X
  1170. X    l.l_onoff = 1;        /* on */
  1171. X    l.l_linger = 15;    /* seconds */
  1172. X
  1173. X    if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *) &l,
  1174. X        sizeof (l)) < 0) {
  1175. X#ifdef LOG
  1176. X        syslog(LOG_ERR,
  1177. X            "access_dnet: setsockopt SOL_SOCKET SO_LINGER: %m");
  1178. X#endif
  1179. X    }
  1180. X}
  1181. X#endif
  1182. END_OF_FILE
  1183. if test 1413 -ne `wc -c <'./server/access_dnet.c'`; then
  1184.     echo shar: \"'./server/access_dnet.c'\" unpacked with wrong size!
  1185. fi
  1186. # end of './server/access_dnet.c'
  1187. fi
  1188. if test -f './server/fakesyslog.c' -a "${1}" != "-c" ; then 
  1189.   echo shar: Will not clobber existing file \"'./server/fakesyslog.c'\"
  1190. else
  1191. echo shar: Extracting \"'./server/fakesyslog.c'\" \(1518 characters\)
  1192. sed "s/^X//" >'./server/fakesyslog.c' <<'END_OF_FILE'
  1193. X#ifndef lint
  1194. static char    *sccsid = "@(#)fakesyslog.c    1.3    (Berkeley) 2/6/88";
  1195. X#endif
  1196. X
  1197. X/*
  1198. X * Fake syslog routines for systems that don't have syslog.
  1199. X * Taken from an idea by Paul McKenny, <mckenny@sri-unix.arpa>.
  1200. X * (Unfortunately, Paul, I can't distribute the real syslog code
  1201. X * as you suggested ... sigh.)
  1202. X *
  1203. X * Warning: this file contains joe code that may offend you.
  1204. X */
  1205. X
  1206. X#include <stdio.h>
  1207. X
  1208. X#include "../common/conf.h"
  1209. X
  1210. X#ifdef FAKESYSLOG
  1211. X
  1212. extern    int    errno;
  1213. extern    int    sys_nerr;
  1214. extern    char    *sys_errlist[];
  1215. X
  1216. static FILE    *logfp;
  1217. X
  1218. char    *strcpy(), *strcat(), *ctime();
  1219. X
  1220. openlog()
  1221. X{
  1222. X    logfp = fopen(FAKESYSLOG, "a");
  1223. X}
  1224. X
  1225. X
  1226. syslog(pri, msg, x1, x2, x3, x4, x5, x6)
  1227. X    int    pri;
  1228. X    char    *msg, *x1, *x2, *x3, *x4, *x5, *x6;
  1229. X{
  1230. X    char        buf[1024];
  1231. X    char        *cp, *bp;
  1232. X    long        clock;
  1233. X    static int    failed = 0;
  1234. X
  1235. X    if (failed)
  1236. X        return;
  1237. X
  1238. X    if (logfp == NULL) {
  1239. X        openlog();
  1240. X        if (logfp == NULL) {
  1241. X            failed = 1;
  1242. X            return;
  1243. X        }
  1244. X    }
  1245. X
  1246. X    (void) time(&clock);
  1247. X    (void) strcpy(buf, ctime(&clock));
  1248. X
  1249. X    bp = buf + strlen(buf)-1;
  1250. X    *bp++ = ' ';
  1251. X    *bp = '\0';
  1252. X    for (cp = msg; *cp; cp++) {
  1253. X        if (*cp == '%' && cp[1] == 'm') {
  1254. X            *bp = '\0';
  1255. X            if (errno >= sys_nerr || errno < 0) {
  1256. X                char    work[32];
  1257. X                sprintf(work, "unknown error #%d", errno);
  1258. X                (void) strcat(bp, work);
  1259. X            } else
  1260. X                (void) strcat(bp, sys_errlist[errno]);
  1261. X            bp = buf + strlen(buf);
  1262. X            cp++;
  1263. X        } else {
  1264. X            *bp++ = *cp;
  1265. X        }
  1266. X    }
  1267. X    *bp = '\0';
  1268. X    /* Ah, the semantic security of C ... */
  1269. X    if (bp[-1] != '\n')
  1270. X        (void) strcat(bp, "\n");
  1271. X
  1272. X    fprintf(logfp, buf, x1, x2, x3, x4, x5, x6);
  1273. X}
  1274. X
  1275. X#endif
  1276. END_OF_FILE
  1277. if test 1518 -ne `wc -c <'./server/fakesyslog.c'`; then
  1278.     echo shar: \"'./server/fakesyslog.c'\" unpacked with wrong size!
  1279. fi
  1280. # end of './server/fakesyslog.c'
  1281. fi
  1282. if test -f './server/fakesyslog.h' -a "${1}" != "-c" ; then 
  1283.   echo shar: Will not clobber existing file \"'./server/fakesyslog.h'\"
  1284. else
  1285. echo shar: Extracting \"'./server/fakesyslog.h'\" \(953 characters\)
  1286. sed "s/^X//" >'./server/fakesyslog.h' <<'END_OF_FILE'
  1287. X/*
  1288. X * Fake syslog definitions.
  1289. X *
  1290. X * @(#)fakesyslog.h    1.1    (Berkeley) 12/18/87
  1291. X */
  1292. X
  1293. X#ifdef FAKESYSLOG
  1294. X
  1295. X/*
  1296. X *  Facility codes
  1297. X */
  1298. X
  1299. X#define LOG_KERN    0
  1300. X#define LOG_USER    0
  1301. X#define LOG_MAIL    0
  1302. X#define LOG_DAEMON    0
  1303. X#define LOG_AUTH    0
  1304. X#define LOG_SYSLOG    0
  1305. X#define LOG_LPR        0
  1306. X#define LOG_NEWS    0
  1307. X#define LOG_LOCAL0    0
  1308. X#define LOG_LOCAL1    0
  1309. X#define LOG_LOCAL2    0
  1310. X#define LOG_LOCAL3    0
  1311. X#define LOG_LOCAL4    0
  1312. X#define LOG_LOCAL5    0
  1313. X#define LOG_LOCAL6    0
  1314. X#define LOG_LOCAL7    0
  1315. X
  1316. X#define LOG_NFACILITIES    0
  1317. X#define LOG_FACMASK    0
  1318. X
  1319. X/*
  1320. X *  Priorities
  1321. X */
  1322. X
  1323. X#define LOG_EMERG    0
  1324. X#define LOG_ALERT    0
  1325. X#define LOG_CRIT    0
  1326. X#define LOG_ERR        0
  1327. X#define LOG_WARNING    0
  1328. X#define LOG_NOTICE    0
  1329. X#define LOG_INFO    0
  1330. X#define LOG_DEBUG    0
  1331. X
  1332. X#define LOG_PRIMASK    0
  1333. X
  1334. X/*
  1335. X * arguments to setlogmask.
  1336. X */
  1337. X
  1338. X#define    LOG_MASK(pri)    0
  1339. X#define    LOG_UPTO(pri)    0
  1340. X
  1341. X/*
  1342. X *  Option flags for openlog.
  1343. X */
  1344. X
  1345. X#define    LOG_PID        0
  1346. X#define    LOG_CONS    0
  1347. X#define    LOG_ODELAY    0
  1348. X#define LOG_NDELAY    0
  1349. X#define LOG_NOWAIT    0
  1350. X
  1351. X#endif FAKESYSLOG
  1352. END_OF_FILE
  1353. if test 953 -ne `wc -c <'./server/fakesyslog.h'`; then
  1354.     echo shar: \"'./server/fakesyslog.h'\" unpacked with wrong size!
  1355. fi
  1356. # end of './server/fakesyslog.h'
  1357. fi
  1358. if test -f './server/globals.c' -a "${1}" != "-c" ; then 
  1359.   echo shar: Will not clobber existing file \"'./server/globals.c'\"
  1360. else
  1361. echo shar: Extracting \"'./server/globals.c'\" \(697 characters\)
  1362. sed "s/^X//" >'./server/globals.c' <<'END_OF_FILE'
  1363. X#ifndef lint
  1364. static char    *sccsid = "@(#)globals.c    1.4    (Berkeley) 7/17/87";
  1365. X#endif
  1366. X
  1367. X/*
  1368. X * Common variables.
  1369. X */
  1370. X
  1371. X#include "common.h"
  1372. X
  1373. X/*
  1374. X * Variables initialized from ../common/conf.h
  1375. X */
  1376. X
  1377. char    spooldir[] = SPOOLDIR;
  1378. char    activefile[] = ACTIVE_FILE;
  1379. char    accessfile[] = ACCESS_FILE;
  1380. char    historyfile[] = HISTORY_FILE;
  1381. char    ngdatefile[] = NGDATE_FILE;
  1382. char    inews[] = INEWS;
  1383. char    rnews[] = RNEWS;
  1384. X
  1385. X/*
  1386. X * Other random externals.
  1387. X */
  1388. X
  1389. char    **group_array;
  1390. int    num_groups;
  1391. int    ingroup = 0;
  1392. int    art_ptr;
  1393. int    num_arts;
  1394. int    art_array[MAX_ARTICLES];
  1395. FILE    *art_fp;
  1396. int    uid_poster, gid_poster;
  1397. int    canpost, canread, canxfer;
  1398. char    **ngpermlist;
  1399. int    ngpermcount;
  1400. X
  1401. X#ifdef LOG
  1402. int    arts_acsd;
  1403. int    grps_acsd;
  1404. X#endif
  1405. END_OF_FILE
  1406. if test 697 -ne `wc -c <'./server/globals.c'`; then
  1407.     echo shar: \"'./server/globals.c'\" unpacked with wrong size!
  1408. fi
  1409. # end of './server/globals.c'
  1410. fi
  1411. if test -f './server/help.c' -a "${1}" != "-c" ; then 
  1412.   echo shar: Will not clobber existing file \"'./server/help.c'\"
  1413. else
  1414. echo shar: Extracting \"'./server/help.c'\" \(833 characters\)
  1415. sed "s/^X//" >'./server/help.c' <<'END_OF_FILE'
  1416. X#ifndef lint
  1417. static char    *sccsid = "@(#)help.c    1.7    (Berkeley) 6/26/87";
  1418. X#endif
  1419. X
  1420. X#include "common.h"
  1421. X
  1422. X/*
  1423. X * HELP
  1424. X *
  1425. X * Provide a naive user with a brief help message.
  1426. X *
  1427. X */
  1428. X
  1429. help(argc, argv)
  1430. int    argc;
  1431. char    *argv[];
  1432. X{
  1433. X    printf("%d This server accepts the following commands:\r\n", INF_HELP);
  1434. X    printf("ARTICLE     BODY         GROUP\r\n");
  1435. X    printf("HEAD        LAST         LIST\r\n");
  1436. X    printf("NEXT        POST         QUIT\r\n");
  1437. X    printf("STAT        NEWGROUPS    HELP\r\n");
  1438. X    printf("IHAVE       NEWNEWS      SLAVE\r\n");
  1439. X    printf("\r\nAdditionally, the following extention is supported:\r\n\r\n");
  1440. X    printf("XHDR        Retrieve a single header line from a range of articles.\r\n");
  1441. X    printf("\r\n");
  1442. X    printf("Bugs to Phil Lapsley (Internet: phil@berkeley.edu; UUCP: ...!ucbvax!phil)\r\n");
  1443. X    printf(".\r\n");
  1444. X    (void) fflush(stdout);
  1445. X}
  1446. END_OF_FILE
  1447. if test 833 -ne `wc -c <'./server/help.c'`; then
  1448.     echo shar: \"'./server/help.c'\" unpacked with wrong size!
  1449. fi
  1450. # end of './server/help.c'
  1451. fi
  1452. if test -f './server/ihave.c' -a "${1}" != "-c" ; then 
  1453.   echo shar: Will not clobber existing file \"'./server/ihave.c'\"
  1454. else
  1455. echo shar: Extracting \"'./server/ihave.c'\" \(1236 characters\)
  1456. sed "s/^X//" >'./server/ihave.c' <<'END_OF_FILE'
  1457. X#ifndef lint
  1458. static char    *sccsid = "@(#)ihave.c    1.11    (Berkeley) 1/11/88";
  1459. X#endif
  1460. X
  1461. X#include "common.h"
  1462. X
  1463. X#ifdef LOG
  1464. int    ih_accepted;
  1465. int    ih_rejected;
  1466. int    ih_failed;
  1467. X#endif LOG
  1468. X
  1469. X/*
  1470. X * IHAVE <messageid>
  1471. X *
  1472. X * Accept an article for transferral if we haven't seen it before.
  1473. X */
  1474. X
  1475. ihave(argc, argv)
  1476. X    int        argc;
  1477. X    char        *argv[];
  1478. X{
  1479. X    char        errbuf[2 * NNTP_STRLEN];
  1480. X    int        retcode;
  1481. X    register char    *cp;
  1482. X
  1483. X    if (argc != 2) {
  1484. X        printf("%d Usage: IHAVE <message-id>.\r\n", ERR_CMDSYN);
  1485. X        (void) fflush(stdout);
  1486. X        return;
  1487. X    }
  1488. X
  1489. X    cp = gethistent(argv[1]);
  1490. X    if (cp != NULL) {
  1491. X        printf("%d Got it.\r\n", ERR_GOTIT);
  1492. X        (void) fflush(stdout);
  1493. X#ifdef LOG
  1494. X        ih_rejected++;
  1495. X#ifdef IHAVE_DEBUG
  1496. X        syslog(LOG_DEBUG, "%s ihave %s rejected", hostname, argv[1]);
  1497. X#endif IHAVE_DEBUG
  1498. X#endif LOG
  1499. X        return;
  1500. X    }
  1501. X        
  1502. X    retcode = spawn(rnews, "rnews", (char *) 0, CONT_XFER, ERR_XFERFAIL, errbuf);
  1503. X    if (retcode <= 0)
  1504. X        printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
  1505. X    else if (retcode > 0)
  1506. X        printf("%d Thanks.\r\n",
  1507. X            OK_XFERED);
  1508. X    (void) fflush(stdout);
  1509. X
  1510. X#ifdef LOG
  1511. X    if (retcode == 1)
  1512. X        ih_accepted++;
  1513. X    else
  1514. X        ih_failed++;
  1515. X        
  1516. X#ifdef IHAVE_DEBUG
  1517. X    syslog(LOG_DEBUG, "%s ihave %s accepted %s",
  1518. X        hostname, argv[1], retcode == 1 ? "succeeded" : "failed");
  1519. X#endif IHAVE_DEBUG
  1520. X#endif LOG
  1521. X
  1522. X}
  1523. END_OF_FILE
  1524. if test 1236 -ne `wc -c <'./server/ihave.c'`; then
  1525.     echo shar: \"'./server/ihave.c'\" unpacked with wrong size!
  1526. fi
  1527. # end of './server/ihave.c'
  1528. fi
  1529. if test -f './server/list.c' -a "${1}" != "-c" ; then 
  1530.   echo shar: Will not clobber existing file \"'./server/list.c'\"
  1531. else
  1532. echo shar: Extracting \"'./server/list.c'\" \(979 characters\)
  1533. sed "s/^X//" >'./server/list.c' <<'END_OF_FILE'
  1534. X#ifndef lint
  1535. static char    *sccsid = "@(#)list.c    1.10    (Berkeley) 2/6/88";
  1536. X#endif
  1537. X
  1538. X#include "common.h"
  1539. X
  1540. X/*
  1541. X * LIST
  1542. X *
  1543. X * List active newsgroups.
  1544. X *
  1545. X */
  1546. X
  1547. list(argc, argv)
  1548. X    int        argc;
  1549. X    char        *argv[];
  1550. X{
  1551. X    char        line[NNTP_STRLEN];
  1552. X    char        *grparray[2];
  1553. X    register char    *cp;
  1554. X    register FILE    *active_fp;
  1555. X
  1556. X    grparray[0] = line;
  1557. X    grparray[1] = NULL;
  1558. X
  1559. X    active_fp = fopen(activefile, "r");
  1560. X
  1561. X    if (active_fp == NULL) {
  1562. X        printf("%d No list of newsgroups available.\r\n", ERR_FAULT);
  1563. X        (void) fflush(stdout);
  1564. X#ifdef SYSLOG
  1565. X        syslog(LOG_ERR, "list: fopen %s: %m", activefile);
  1566. X#endif
  1567. X        return;
  1568. X    }
  1569. X
  1570. X    printf("%d Newsgroups in form \"group high low y/n/m\".\r\n",
  1571. X        OK_GROUPS);
  1572. X
  1573. X    while (fgets(line, sizeof(line), active_fp) != NULL) {
  1574. X        if ((cp = index(line, '\n')) != NULL)
  1575. X            *cp = '\0';
  1576. X        if (ngpermcount)
  1577. X            if (ngmatch(s1strneql, ALLBUT,
  1578. X                ngpermlist, ngpermcount,
  1579. X                grparray, 1) == 0)
  1580. X                continue;
  1581. X        putline(line);
  1582. X    }
  1583. X    (void) fclose(active_fp);
  1584. X
  1585. X    putline(".");
  1586. X    (void) fflush(stdout);
  1587. X}
  1588. END_OF_FILE
  1589. if test 979 -ne `wc -c <'./server/list.c'`; then
  1590.     echo shar: \"'./server/list.c'\" unpacked with wrong size!
  1591. fi
  1592. # end of './server/list.c'
  1593. fi
  1594. if test -f './server/post.c' -a "${1}" != "-c" ; then 
  1595.   echo shar: Will not clobber existing file \"'./server/post.c'\"
  1596. else
  1597. echo shar: Extracting \"'./server/post.c'\" \(1047 characters\)
  1598. sed "s/^X//" >'./server/post.c' <<'END_OF_FILE'
  1599. X#ifndef lint
  1600. static char    *sccsid = "@(#)post.c    1.12    (Berkeley) 1/11/88";
  1601. X#endif
  1602. X
  1603. X#include "common.h"
  1604. X
  1605. X/*
  1606. X * POST
  1607. X *
  1608. X * Post an article to a set of newsgroups.
  1609. X */
  1610. X
  1611. post(argc, argv)
  1612. X    int    argc;
  1613. X    char    *argv[];
  1614. X{
  1615. X    char    errbuf[2 * NNTP_STRLEN];
  1616. X    int    retcode;
  1617. X
  1618. X    if (!canpost) {
  1619. X        printf("%d Sorry, you're not allowed to post.\r\n",
  1620. X            ERR_NOPOST);
  1621. X#ifdef LOG
  1622. X            syslog(LOG_INFO, "%s post rejected", hostname);
  1623. X#endif
  1624. X        (void) fflush(stdout);
  1625. X        return;
  1626. X    }
  1627. X
  1628. X#ifdef POSTER
  1629. X    if (uid_poster == 0) {
  1630. X        printf("%d User %s does not exist!  Can't post.\r\n",
  1631. X            ERR_POSTFAIL, POSTER);
  1632. X#ifdef SYSLOG
  1633. X        syslog(LOG_ERR, "post: User %s does not exist.", POSTER);
  1634. X#endif
  1635. X        (void) fflush(stdout);
  1636. X        return;
  1637. X    }
  1638. X#endif
  1639. X
  1640. X    retcode = spawn(inews, "inews", "-h", CONT_POST, ERR_POSTFAIL, errbuf);
  1641. X    if (retcode <= 0)
  1642. X        printf("%d %s\r\n", ERR_POSTFAIL, errbuf);
  1643. X    else if (retcode > 0)
  1644. X        printf("%d Article posted successfully.\r\n", OK_POSTED);
  1645. X    (void) fflush(stdout);
  1646. X
  1647. X#ifdef LOG
  1648. X    syslog(LOG_INFO, "%s post %s", hostname,
  1649. X            retcode == 1 ? "succeeded" : "failed");
  1650. X#endif
  1651. X}
  1652. END_OF_FILE
  1653. if test 1047 -ne `wc -c <'./server/post.c'`; then
  1654.     echo shar: \"'./server/post.c'\" unpacked with wrong size!
  1655. fi
  1656. # end of './server/post.c'
  1657. fi
  1658. if test -f './server/profile.c' -a "${1}" != "-c" ; then 
  1659.   echo shar: Will not clobber existing file \"'./server/profile.c'\"
  1660. else
  1661. echo shar: Extracting \"'./server/profile.c'\" \(381 characters\)
  1662. sed "s/^X//" >'./server/profile.c' <<'END_OF_FILE'
  1663. X#ifndef lint
  1664. static char    *sccsid = "@(#)profile.c    1.1    (Berkeley) 12/18/87";
  1665. X#endif
  1666. X
  1667. X#include <sys/types.h>
  1668. X#include <sys/stat.h>
  1669. X
  1670. X#define    MON    "gmon.out"
  1671. X#define    DIR    "/usr/tmp/nntpd.prof"
  1672. X
  1673. profile()
  1674. X{
  1675. X    static char    tmp[] = "gmon.XXXXXX";
  1676. X    struct stat    statbuf;
  1677. X
  1678. X    if (chdir(DIR) < 0)
  1679. X        return;
  1680. X
  1681. X    if (stat(MON, statbuf) < 0)
  1682. X        return;
  1683. X
  1684. X    (void) mktemp(tmp);
  1685. X
  1686. X    (void) rename(MON, tmp);
  1687. X}
  1688. END_OF_FILE
  1689. if test 381 -ne `wc -c <'./server/profile.c'`; then
  1690.     echo shar: \"'./server/profile.c'\" unpacked with wrong size!
  1691. fi
  1692. # end of './server/profile.c'
  1693. fi
  1694. if test -f './server/scandir.c' -a "${1}" != "-c" ; then 
  1695.   echo shar: Will not clobber existing file \"'./server/scandir.c'\"
  1696. else
  1697. echo shar: Extracting \"'./server/scandir.c'\" \(1300 characters\)
  1698. sed "s/^X//" >'./server/scandir.c' <<'END_OF_FILE'
  1699. X#ifndef lint
  1700. static char    *sccsid = "@(#)scandir.c    1.3    (Berkeley) 6/26/87";
  1701. X#endif
  1702. X
  1703. X#include "common.h"
  1704. X
  1705. X/*
  1706. X * scan_dir -- scan the current directory for news articles,
  1707. X *    loading the article numbers into art_array.  Return
  1708. X *    number of articles loaded.
  1709. X *
  1710. X *    Paramaters:    "low_msg", "high_msg" are the low
  1711. X *            and high messages numbers in this
  1712. X *            group; we ignore numbers outside this
  1713. X *            range.
  1714. X *
  1715. X *    Returns:    Number of articles loaded into
  1716. X *            array.
  1717. X *
  1718. X *    Side effects:    Changes "art_array".
  1719. X */
  1720. X
  1721. extern    int    intcmp();
  1722. X
  1723. scan_dir(low_msg, high_msg)
  1724. int    low_msg, high_msg;
  1725. X{
  1726. X    register struct direct    *dirent;
  1727. X    register DIR        *dirp;
  1728. X    int            artnum;
  1729. X
  1730. X    num_arts = 0;
  1731. X
  1732. X    dirp = opendir(".");
  1733. X
  1734. X    if (dirp == NULL)
  1735. X        return (0);
  1736. X
  1737. X    while ((dirent = readdir(dirp)) != NULL) {
  1738. X        artnum = atoi(dirent->d_name);
  1739. X        if (artnum != 0 && artnum >= low_msg && artnum <= high_msg)
  1740. X            art_array[num_arts++] = artnum;
  1741. X    }
  1742. X
  1743. X    closedir(dirp);
  1744. X
  1745. X    qsort((char *) art_array, num_arts, sizeof(int), intcmp);
  1746. X
  1747. X    return (num_arts);
  1748. X}
  1749. X
  1750. X
  1751. X/*
  1752. X * intcmp -- compare to integers.
  1753. X *
  1754. X *    Parameters:    "x", "y" point to the integers to be compared.
  1755. X *
  1756. X *    Returns:    -1 if "x" is less than "y",
  1757. X *            0 if "x" equals "y", and
  1758. X *            1 if "x" is greater than "y".
  1759. X *
  1760. X *    Side effects:    None.
  1761. X */
  1762. X
  1763. intcmp(x, y)
  1764. register int    *x, *y;
  1765. X{
  1766. X    return (*x - *y);
  1767. X}
  1768. END_OF_FILE
  1769. if test 1300 -ne `wc -c <'./server/scandir.c'`; then
  1770.     echo shar: \"'./server/scandir.c'\" unpacked with wrong size!
  1771. fi
  1772. # end of './server/scandir.c'
  1773. fi
  1774. if test -f './server/slave.c' -a "${1}" != "-c" ; then 
  1775.   echo shar: Will not clobber existing file \"'./server/slave.c'\"
  1776. else
  1777. echo shar: Extracting \"'./server/slave.c'\" \(350 characters\)
  1778. sed "s/^X//" >'./server/slave.c' <<'END_OF_FILE'
  1779. X#ifndef lint
  1780. static char    *sccsid = "@(#)slave.c    1.3    (Berkeley) 6/26/87";
  1781. X#endif
  1782. X
  1783. X#include "common.h"
  1784. X
  1785. X/*
  1786. X * SLAVE
  1787. X *
  1788. X * note slave status, which is actually unimplemented.
  1789. X */
  1790. X
  1791. slave(argc, argv)
  1792. X    int    argc;
  1793. X    char    *argv[];
  1794. X{
  1795. X    printf("%d Kinky, kinky.  I don't support such perversions.\r\n",
  1796. X        OK_SLAVE);        /* Thanks Serge! */
  1797. X    (void) fflush(stdout);
  1798. X}
  1799. END_OF_FILE
  1800. if test 350 -ne `wc -c <'./server/slave.c'`; then
  1801.     echo shar: \"'./server/slave.c'\" unpacked with wrong size!
  1802. fi
  1803. # end of './server/slave.c'
  1804. fi
  1805. if test -f './server/time.h' -a "${1}" != "-c" ; then 
  1806.   echo shar: Will not clobber existing file \"'./server/time.h'\"
  1807. else
  1808. echo shar: Extracting \"'./server/time.h'\" \(177 characters\)
  1809. sed "s/^X//" >'./server/time.h' <<'END_OF_FILE'
  1810. X/*
  1811. X * Time manipulation routines.
  1812. X *
  1813. X * @(#)time.h    1.1    (Berkeley) 12/18/87
  1814. X */
  1815. X
  1816. extern    long    dtol();
  1817. extern    char    *ltod();
  1818. extern    long    local_to_gmt();
  1819. extern    long    gmt_to_local();
  1820. END_OF_FILE
  1821. if test 177 -ne `wc -c <'./server/time.h'`; then
  1822.     echo shar: \"'./server/time.h'\" unpacked with wrong size!
  1823. fi
  1824. # end of './server/time.h'
  1825. fi
  1826. if test ! -d './support' ; then
  1827.     echo shar: Creating directory \"'./support'\"
  1828.     mkdir './support'
  1829. fi
  1830. if test -f './support/Makefile' -a "${1}" != "-c" ; then 
  1831.   echo shar: Will not clobber existing file \"'./support/Makefile'\"
  1832. else
  1833. echo shar: Extracting \"'./support/Makefile'\" \(573 characters\)
  1834. sed "s/^X//" >'./support/Makefile' <<'END_OF_FILE'
  1835. X#
  1836. X# Makefile for NNTP server support programs
  1837. X#
  1838. X
  1839. OBJS    =    mkgrdates.o
  1840. X
  1841. SRCS    =    mkgrdates.c
  1842. X
  1843. HFILES    =    ../common/conf.h
  1844. X
  1845. CFLAGS= -O
  1846. X
  1847. X# Where these support programs will live
  1848. X
  1849. DESTDIR    = /usr/lib/news
  1850. X
  1851. all: mkgrdates
  1852. X
  1853. mkgrdates: mkgrdates.o
  1854. X    $(CC) ${CFLAGS} -o mkgrdates mkgrdates.o
  1855. X
  1856. install: mkgrdates
  1857. X    cp mkgrdates ${DESTDIR}/mkgrdates
  1858. X    chmod 755 ${DESTDIR}/mkgrdates
  1859. X
  1860. lint:
  1861. X    lint mkgrdates.c
  1862. X
  1863. clean:
  1864. X    -rm -f *.o mkgrdates
  1865. X
  1866. distrib: clean
  1867. X    rm -rf SCCS old
  1868. X
  1869. check:
  1870. X    sccs check
  1871. X    sccs prt -y *.[ch] > /dev/null
  1872. X
  1873. tags:    ${SRCS} ${HFILES}
  1874. X    ctags ${SRCS} ${HFILES}
  1875. X
  1876. X${OBJS}:    ${HFILES}
  1877. END_OF_FILE
  1878. if test 573 -ne `wc -c <'./support/Makefile'`; then
  1879.     echo shar: \"'./support/Makefile'\" unpacked with wrong size!
  1880. fi
  1881. # end of './support/Makefile'
  1882. fi
  1883. if test -f './support/access_file' -a "${1}" != "-c" ; then 
  1884.   echo shar: Will not clobber existing file \"'./support/access_file'\"
  1885. else
  1886. echo shar: Extracting \"'./support/access_file'\" \(717 characters\)
  1887. sed "s/^X//" >'./support/access_file' <<'END_OF_FILE'
  1888. X#
  1889. X# Sample NNTP access file.  "read" implies "xfer".
  1890. X# Note that "default" must be the first entry in the
  1891. X# table.
  1892. X#
  1893. X# If you defined SUBNET when you compiled the server,
  1894. X# this file can have subnets as well as class A, B, C
  1895. X# networks and hosts.
  1896. X#
  1897. X# host/net    read/xfer/no    post/no
  1898. X#
  1899. X# by default, let anyone transfer news, but not read or post
  1900. default        xfer        no
  1901. X# hosts on the Berkeley campus can read and post news
  1902. ucb-ether    read        post
  1903. X# bugs, a notorious undergraduate machine, is not allowed
  1904. X# to read or post news at all.
  1905. bugs        read        no
  1906. X# ic can read and post news, but users on ic cannot read
  1907. X# articles in the group ucb.postgres or any of its decendents
  1908. X# (e.g., ucb.postgres.core)
  1909. ic        read        post    !ucb.postgres
  1910. END_OF_FILE
  1911. if test 717 -ne `wc -c <'./support/access_file'`; then
  1912.     echo shar: \"'./support/access_file'\" unpacked with wrong size!
  1913. fi
  1914. # end of './support/access_file'
  1915. fi
  1916. if test ! -d './xfer' ; then
  1917.     echo shar: Creating directory \"'./xfer'\"
  1918.     mkdir './xfer'
  1919. fi
  1920. if test -f './xfer/Makefile' -a "${1}" != "-c" ; then 
  1921.   echo shar: Will not clobber existing file \"'./xfer/Makefile'\"
  1922. else
  1923. echo shar: Extracting \"'./xfer/Makefile'\" \(77 characters\)
  1924. sed "s/^X//" >'./xfer/Makefile' <<'END_OF_FILE'
  1925. X
  1926. clean:
  1927. X    -rm -f *.o nntpxfer make*.out
  1928. X
  1929. distrib: clean
  1930. X    rm -rf SCCS
  1931. X
  1932. check:;
  1933. END_OF_FILE
  1934. if test 77 -ne `wc -c <'./xfer/Makefile'`; then
  1935.     echo shar: \"'./xfer/Makefile'\" unpacked with wrong size!
  1936. fi
  1937. # end of './xfer/Makefile'
  1938. fi
  1939. if test -f './xfer/README' -a "${1}" != "-c" ; then 
  1940.   echo shar: Will not clobber existing file \"'./xfer/README'\"
  1941. else
  1942. echo shar: Extracting \"'./xfer/README'\" \(339 characters\)
  1943. sed "s/^X//" >'./xfer/README' <<'END_OF_FILE'
  1944. This is a "passive" news transmission client.  It queries
  1945. other servers for news with NEWNEWS and gets it via the article
  1946. command.
  1947. X
  1948. No docs, sorry.  It's unsupported (like the rest of the stuff is???).
  1949. Read the source code.
  1950. X
  1951. Originally written by Brian Kantor <brian@sdcsvax.ucsd.edu>, with some
  1952. bug fixes by Ambar <ambar@athena.mit.edu>.
  1953. END_OF_FILE
  1954. if test 339 -ne `wc -c <'./xfer/README'`; then
  1955.     echo shar: \"'./xfer/README'\" unpacked with wrong size!
  1956. fi
  1957. # end of './xfer/README'
  1958. fi
  1959. if test ! -d './xmit' ; then
  1960.     echo shar: Creating directory \"'./xmit'\"
  1961.     mkdir './xmit'
  1962. fi
  1963. if test -f './xmit/README' -a "${1}" != "-c" ; then 
  1964.   echo shar: Will not clobber existing file \"'./xmit/README'\"
  1965. else
  1966. echo shar: Extracting \"'./xmit/README'\" \(1444 characters\)
  1967. sed "s/^X//" >'./xmit/README' <<'END_OF_FILE'
  1968. X     The program "nntpxmit" is an active trnamission client
  1969. X(see the comment in nntpxmit.c for a description of the
  1970. difference between active and passive clients) written by Erik Fair
  1971. X<fair@ucbvax.berkeley.edu, ...!ucbvax!fair>.  A larger comment on
  1972. its inner workings can be found by looking at nntpxmit.c
  1973. X
  1974. X     To use nntpxmit, you should edit your news sys file to have
  1975. an entry like this:
  1976. X
  1977. X#
  1978. X# NASA Ames Research Center
  1979. X#
  1980. nike:ucb,uc,mod,to.nike:F:/usr/spool/news/batch/ames-titan.arpa
  1981. X
  1982. This will place names of news articles in the ucb, uc, and mod newsgroups
  1983. in the file "/usr/spool/news/batch/ames-titan.arpa".  This is because
  1984. we assume the output batch file will be the machine's internet name.
  1985. X
  1986. Periodically, you should have crontab run "nntpsend" to transmit
  1987. the news.  A good choice for "periodically" is every 10 minutes.
  1988. nntpsend depends on the program "shlock", which make should have
  1989. made already.  Also, nntpsend will need to be customized for your system.
  1990. Fortunately, it's pretty straightforward.
  1991. X
  1992. X     nntpxmit has an option "-s" which *supresses* statistic
  1993. logging via syslog.  Additionally, the "-d" option is availible
  1994. for debugging.
  1995. X
  1996. X     Please forward comments/suggestions for improvement/bugs to
  1997. Erik Fair, <fair@ucbvax.berkeley.edu>.
  1998. X
  1999. X     [My thanks extended to Erik for writing nntpxmit, shlock,
  2000. and the stats scripts.  My thanks also to Mel Pleasant
  2001. X<pleasant@topaz.rutgers.edu> for the nntpsend script.  --Phil]
  2002. END_OF_FILE
  2003. if test 1444 -ne `wc -c <'./xmit/README'`; then
  2004.     echo shar: \"'./xmit/README'\" unpacked with wrong size!
  2005. fi
  2006. # end of './xmit/README'
  2007. fi
  2008. if test -f './xmit/get_tcp_conn.h' -a "${1}" != "-c" ; then 
  2009.   echo shar: Will not clobber existing file \"'./xmit/get_tcp_conn.h'\"
  2010. else
  2011. echo shar: Extracting \"'./xmit/get_tcp_conn.h'\" \(510 characters\)
  2012. sed "s/^X//" >'./xmit/get_tcp_conn.h' <<'END_OF_FILE'
  2013. X/*
  2014. X** Return codes from get_tcp_conn().
  2015. X*/
  2016. X#ifndef    FAIL
  2017. X#define FAIL        (-1)        /* routine failed */
  2018. X#endif
  2019. X#define    NOHOST        (FAIL-1)    /* no such host */
  2020. X#define    NOSERVICE    (FAIL-2)    /* no such service */
  2021. X
  2022. X#ifndef NULL
  2023. X#define    NULL    0
  2024. X#endif
  2025. X
  2026. X#ifdef USG    /* brain-dead USG compilers can't deal with typedef */
  2027. X#define    u_long    unsigned long
  2028. X#define    u_short    unsigned short
  2029. X#endif
  2030. X
  2031. X#ifdef    EXCELAN
  2032. X#define    NONETDB
  2033. X#define    OLDSOCKET
  2034. X#endif
  2035. X
  2036. X#ifdef    NONETDB
  2037. X#define    IPPORT_NNTP    119        /* NNTP is on TCP port 119 */
  2038. X#endif    NONETDB
  2039. END_OF_FILE
  2040. if test 510 -ne `wc -c <'./xmit/get_tcp_conn.h'`; then
  2041.     echo shar: \"'./xmit/get_tcp_conn.h'\" unpacked with wrong size!
  2042. fi
  2043. # end of './xmit/get_tcp_conn.h'
  2044. fi
  2045. if test -f './xmit/llist.c' -a "${1}" != "-c" ; then 
  2046.   echo shar: Will not clobber existing file \"'./xmit/llist.c'\"
  2047. else
  2048. echo shar: Extracting \"'./xmit/llist.c'\" \(1179 characters\)
  2049. sed "s/^X//" >'./xmit/llist.c' <<'END_OF_FILE'
  2050. X/*
  2051. X** Routines for fiddlin' linked lists
  2052. X** Erik E. Fair <fair@ucbarpa.berkeley.edu>
  2053. X*/
  2054. X
  2055. X#include <sys/types.h>
  2056. X#include "llist.h"
  2057. X
  2058. extern free();
  2059. extern caddr_t    malloc();
  2060. X
  2061. X/*
  2062. X** a little wasteful for some cases, but it works, and I don't mind
  2063. X** the extra padding - think of it as insurance.
  2064. X*/
  2065. X#define    ALIGN(x)    ((x) + (sizeof(long) - (x) % sizeof(long)))
  2066. X
  2067. X/*
  2068. X** recursively free a linked list
  2069. X*/
  2070. void
  2071. l_free(lp)
  2072. register ll_t *lp;
  2073. X{
  2074. X    if (lp->l_next == (ll_t *)NULL)
  2075. X        return;
  2076. X    l_free(lp->l_next);
  2077. X    (void) free(lp->l_item);
  2078. X}
  2079. X
  2080. X/*
  2081. X** allocate a new element in a linked list, along with enough space
  2082. X** at the end of the item for the next list element header.
  2083. X*/
  2084. ll_t *
  2085. l_alloc(lp, s, len)
  2086. register ll_t    *lp;
  2087. caddr_t    s;
  2088. register int len;
  2089. X{
  2090. X    if (s == (caddr_t)NULL || lp == (ll_t *)NULL || len <= 0)
  2091. X        return((ll_t *)NULL);
  2092. X
  2093. X    lp->l_len = len;
  2094. X    len = ALIGN(len);
  2095. X
  2096. X    if ((lp->l_item = malloc((unsigned)len + sizeof(ll_t))) == (caddr_t)NULL)
  2097. X        return((ll_t *)NULL);
  2098. X
  2099. X    bcopy(s, lp->l_item, lp->l_len);
  2100. X    lp->l_next = (ll_t *)(&lp->l_item[len]);
  2101. X
  2102. X    /*
  2103. X    ** set up next list entry
  2104. X    */
  2105. X    lp = lp->l_next;
  2106. X    lp->l_next = (ll_t *)NULL;
  2107. X    lp->l_item = (caddr_t)NULL;
  2108. X    lp->l_len = 0;
  2109. X    return(lp);
  2110. X}
  2111. END_OF_FILE
  2112. if test 1179 -ne `wc -c <'./xmit/llist.c'`; then
  2113.     echo shar: \"'./xmit/llist.c'\" unpacked with wrong size!
  2114. fi
  2115. # end of './xmit/llist.c'
  2116. fi
  2117. if test -f './xmit/llist.h' -a "${1}" != "-c" ; then 
  2118.   echo shar: Will not clobber existing file \"'./xmit/llist.h'\"
  2119. else
  2120. echo shar: Extracting \"'./xmit/llist.h'\" \(354 characters\)
  2121. sed "s/^X//" >'./xmit/llist.h' <<'END_OF_FILE'
  2122. X/*
  2123. X** Stuff for fiddlin' linked lists
  2124. X** Erik E. Fair <fair@ucbarpa.berkeley.edu>
  2125. X*/
  2126. X
  2127. struct llist {
  2128. X    struct llist    *l_next;
  2129. X    caddr_t        l_item;
  2130. X    int        l_len;
  2131. X};
  2132. X
  2133. typedef    struct llist    ll_t;
  2134. X
  2135. extern void    l_free();
  2136. extern ll_t    *l_alloc();
  2137. X
  2138. X#ifndef NULL
  2139. X#define NULL    0
  2140. X#endif
  2141. X
  2142. X#define    L_LOOP(p,head)    \
  2143. X    for(p = &head; p->l_item != (caddr_t)NULL; p = p->l_next)
  2144. END_OF_FILE
  2145. if test 354 -ne `wc -c <'./xmit/llist.h'`; then
  2146.     echo shar: \"'./xmit/llist.h'\" unpacked with wrong size!
  2147. fi
  2148. # end of './xmit/llist.h'
  2149. fi
  2150. if test -f './xmit/nntpsend.sh' -a "${1}" != "-c" ; then 
  2151.   echo shar: Will not clobber existing file \"'./xmit/nntpsend.sh'\"
  2152. else
  2153. echo shar: Extracting \"'./xmit/nntpsend.sh'\" \(1365 characters\)
  2154. sed "s/^X//" >'./xmit/nntpsend.sh' <<'END_OF_FILE'
  2155. X#!/bin/sh
  2156. X#
  2157. X# What we have here is a csh script for sending netnews to NNTP sites.
  2158. X#
  2159. batchdir=/usr/spool/news/batch
  2160. libdir=/usr/spool/news/lib
  2161. PATH=${libdir}:/usr/ucb:/usr/bin:/bin:${PATH}
  2162. export PATH
  2163. pname=`basename $0`
  2164. echo ${pname}: "[$$]" begin `date`
  2165. X#
  2166. X# Go to where the action is
  2167. X#
  2168. cd $batchdir
  2169. umask 022
  2170. X#
  2171. X#    For NNTP
  2172. X#
  2173. X#    Here "foo", "bar", and "zot" are the Internet names of
  2174. X#    the machines to which to send.  We make the supposition
  2175. X#    that the batch files will be a host's internet name.
  2176. X#    So, for example "nike"'s internet name is "ames-titan.arpa".
  2177. X#    Because of this, your sys file must have "ames-titan.arpa"
  2178. X#    as the batch file output for the machine "nike".
  2179. X#
  2180. for host in ${remotes=$*}
  2181. do
  2182. X    lock=L.${host}
  2183. X    tmp=${host}.tmp
  2184. X    send=${host}.nntp
  2185. X    if shlock -p $$ -f ${lock} ; then
  2186. X        if test -e ${tmp} ; then
  2187. X            cat ${tmp} >> ${send}
  2188. X            rm ${tmp}
  2189. X        fi
  2190. X# we let the tmp file cool off for a while if there's other work to do
  2191. X# and we pick it up again during next iteration
  2192. X        if test -e ${host} ; then
  2193. X            if test -e ${send} ; then
  2194. X                mv ${host} ${tmp}
  2195. X            else
  2196. X                mv ${host} ${send}
  2197. X            fi
  2198. X        fi
  2199. X        if test -e ${send} ; then
  2200. X            echo ${pname}: "[$$]" begin ${host}
  2201. X            time nntpxmit ${host}:${send}
  2202. X            echo ${pname}: "[$$]" end ${host}
  2203. X        fi
  2204. X        rm -f ${lock}
  2205. X    else
  2206. X        echo ${pname}: "[$$]" ${host} locked by "[`cat ${lock}`]"
  2207. X    fi
  2208. done
  2209. echo ${pname}: "[$$]" end `date`
  2210. END_OF_FILE
  2211. if test 1365 -ne `wc -c <'./xmit/nntpsend.sh'`; then
  2212.     echo shar: \"'./xmit/nntpsend.sh'\" unpacked with wrong size!
  2213. fi
  2214. # end of './xmit/nntpsend.sh'
  2215. fi
  2216. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  2217.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  2218. else
  2219. echo shar: Extracting \"'MANIFEST'\" \(3853 characters\)
  2220. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  2221. X   File Name        Archive #    Description
  2222. X-----------------------------------------------------------
  2223. X .                          1    
  2224. X ./CHANGES                  6    
  2225. X ./Makefile                 1    
  2226. X ./README                   5    
  2227. X ./common                   1    
  2228. X ./common/Makefile          1    
  2229. X ./common/README            7    
  2230. X ./common/README.HPUX       1    
  2231. X ./common/README.LIB        1    
  2232. X ./common/README.SYSV       1    
  2233. X ./common/clientlib.c       6    
  2234. X ./common/clientlib.h       1    
  2235. X ./common/conf.h            4    
  2236. X ./common/nntp.h            2    
  2237. X ./common/version.c         1    
  2238. X ./doc                      1    
  2239. X ./doc/Makefile             1    
  2240. X ./doc/README               1    
  2241. X ./doc/config.sh            2    
  2242. X ./doc/getactive.dst        1    
  2243. X ./doc/mkgrdates.dst        2    
  2244. X ./doc/nntpd.dst            4    
  2245. X ./doc/nntpxmit.1           4    
  2246. X ./doc/rfc977               9    
  2247. X ./inews                    1    
  2248. X ./inews/Makefile           1    
  2249. X ./inews/README             2    
  2250. X ./inews/inews.c            4    
  2251. X ./inews/test               1    
  2252. X ./inews/test1              1    
  2253. X ./inews/test2              1    
  2254. X ./inews/uname.c            2    
  2255. X ./rrnpatches               1    
  2256. X ./rrnpatches/Configure.pat  5    
  2257. X ./rrnpatches/MAKE_RRN_CHANGES  1    
  2258. X ./rrnpatches/Makefile.SH.pat  3    
  2259. X ./rrnpatches/Pnews.SH.pat  1    
  2260. X ./rrnpatches/README_RRN    1    
  2261. X ./rrnpatches/Rnmail.SH.pat  1    
  2262. X ./rrnpatches/addng.c.pat   1    
  2263. X ./rrnpatches/artio.c.pat   3    
  2264. X ./rrnpatches/common.h.pat  3    
  2265. X ./rrnpatches/final.c.pat   1    
  2266. X ./rrnpatches/getactive.c   2    
  2267. X ./rrnpatches/head.c.pat    3    
  2268. X ./rrnpatches/init.c.pat    2    
  2269. X ./rrnpatches/newsetup.SH.pat  4    
  2270. X ./rrnpatches/newsgroups.SH.pat  1    
  2271. X ./rrnpatches/ng.c.pat      4    
  2272. X ./rrnpatches/ngdata.c.pat  2    
  2273. X ./rrnpatches/ngdata.h.pat  1    
  2274. X ./rrnpatches/rcstuff.c.pat  5    
  2275. X ./rrnpatches/respond.c.pat  2    
  2276. X ./rrnpatches/term.c.pat    1    
  2277. X ./rrnpatches/util.c.pat    1    
  2278. X ./server                   1    
  2279. X ./server/Makefile          1    
  2280. X ./server/README            3    
  2281. X ./server/SYSLOG            2    
  2282. X ./server/access.c          3    
  2283. X ./server/access_dnet.c     1    
  2284. X ./server/access_inet.c     3    
  2285. X ./server/active.c          3    
  2286. X ./server/ahbs.c            2    
  2287. X ./server/common.h          2    
  2288. X ./server/fakesyslog.c      1    
  2289. X ./server/fakesyslog.h      1    
  2290. X ./server/globals.c         1    
  2291. X ./server/group.c           2    
  2292. X ./server/help.c            1    
  2293. X ./server/ihave.c           1    
  2294. X ./server/list.c            1    
  2295. X ./server/main.c            2    
  2296. X ./server/misc.c            7    
  2297. X ./server/netaux.c          4    
  2298. X ./server/newgroups.c       2    
  2299. X ./server/newnews.c         6    
  2300. X ./server/nextlast.c        2    
  2301. X ./server/ngmatch.c         2    
  2302. X ./server/parsit.c          2    
  2303. X ./server/post.c            1    
  2304. X ./server/profile.c         1    
  2305. X ./server/scandir.c         1    
  2306. X ./server/serve.c           5    
  2307. X ./server/slave.c           1    
  2308. X ./server/spawn.c           4    
  2309. X ./server/strcasecmp.c      3    
  2310. X ./server/subnet.c          5    
  2311. X ./server/time.c            3    
  2312. X ./server/time.h            1    
  2313. X ./server/xhdr.c            3    
  2314. X ./support                  1    
  2315. X ./support/Makefile         1    
  2316. X ./support/README           2    
  2317. X ./support/access_file      1    
  2318. X ./support/mkgrdates.c      3    
  2319. X ./support/nntp_awk         7    
  2320. X ./support/nntp_awk.ucbvax  8    
  2321. X ./xfer                     1    
  2322. X ./xfer/Makefile            1    
  2323. X ./xfer/README              1    
  2324. X ./xfer/nntpxfer.c          6    
  2325. X ./xmit                     1    
  2326. X ./xmit/Makefile            2    
  2327. X ./xmit/README              1    
  2328. X ./xmit/get_tcp_conn.c      5    
  2329. X ./xmit/get_tcp_conn.h      1    
  2330. X ./xmit/llist.c             1    
  2331. X ./xmit/llist.h             1    
  2332. X ./xmit/nntp.h              2    
  2333. X ./xmit/nntp_awk            7    
  2334. X ./xmit/nntpsend.csh        2    
  2335. X ./xmit/nntpsend.sh         1    
  2336. X ./xmit/nntpxmit.1          4    
  2337. X ./xmit/nntpxmit.c          8    
  2338. X ./xmit/nntpxmit.h          2    
  2339. X ./xmit/remote.c            6    
  2340. X ./xmit/shlock.c            5    
  2341. X ./xmit/sysexits.h          3    
  2342. X MANIFEST                   1    This shipping list
  2343. END_OF_FILE
  2344. if test 3853 -ne `wc -c <'MANIFEST'`; then
  2345.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  2346. fi
  2347. # end of 'MANIFEST'
  2348. fi
  2349. echo shar: End of archive 1 \(of 9\).
  2350. cp /dev/null ark1isdone
  2351. MISSING=""
  2352. for I in 1 2 3 4 5 6 7 8 9 ; do
  2353.     if test ! -f ark${I}isdone ; then
  2354.     MISSING="${MISSING} ${I}"
  2355.     fi
  2356. done
  2357. if test "${MISSING}" = "" ; then
  2358.     echo You have unpacked all 9 archives.
  2359.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2360. else
  2361.     echo You still need to unpack the following archives:
  2362.     echo "        " ${MISSING}
  2363. fi
  2364. ##  End of shell archive.
  2365. exit 0
  2366.